///@ait_only
/** @file ait_config.h

All configuration compiler options go here.
The purpose is to prepare many versions of the file to different use cases,
such as different customers and different platforms. When compiling, simply replace this file and then compile the whole project.
This file could be used both in host and firmware projects.

@brief Configuration compiler options
@author Truman Yang
@since 10-Jul-06
@version
- 2.0 Changed name ait_config.h from config.h to reduce integration naming issue
- 1.0 Original version
*/
#ifndef AIT_CONFIG_H
#define AIT_CONFIG_H

#include "mmp_lib.h"
#include "ait_bsp.h"

	#define DEMOKIT  (1)
	#define ADAGIO   (2)	
	#define PRESTIGE (3)
	#define STAGE    (4)
	#define PURE     (5)	
	#define HELIUM   (6)		
	#define PROJECT     (DEMOKIT)
	#define SENSOR_SXGA_CROPPING_HD     (0)        // only for sensor cropping issue
	//#define LCD_PREVIEW_PIPE_ENABLE     (0)
/** @name Sensor & panel setting
@{ */
    /// Using this flag to switch I2C setting between sensor and external audio DAC.
    /// When firmware initial sensor with software I2C, set as 0. Otherwise, set as 1.
    /// Default: 1.
    #define SENSOR_USE_HW_I2C  1

    #define SENSOR_COUNT_MAX_NUM        (2)         ///< Maximum sensor support count
    #define SENSOR_MODE_MAX_NUM         (3)         ///< Maximum sensor mode count
    #define SENSOR_FRAMERATE_MAX_NUM    (6)         ///< Maximum sensor frame rate count
	#define SENSOR_EV_MAX_NUM           (19)        /// maximum exposure value level

    /// Select sensor model for multi-sensor configuration.
    #define MAIN_SENSOR                 0
    #define SUB_SENSOR                  1

/** @} */ // end of sensor and panel

/** @name DSC
@{ */
    #define DSC_MODE_MAX_NUM            (4)         ///< maximum preview mode	
    #define DSC_DECODE_MODE_MAX_NUM     (5)         ///< maximum decode mode
    #if (PROJECT == DEMOKIT)
    #define DSC_RESOL_MAX_NUM           (7)         ///< maximum capture resolution number
    #endif
    #if (PROJECT == PRESTIGE)
    #define DSC_RESOL_MAX_NUM           (6)         ///< maximum capture resolution number
    #endif
	#define DSC_SHOT_MODE_MAX_NUM       (2)         ///< maximum shot mode
    #define DSC_MULTISHOT_MAX_NUM       (9)         ///< maximum multishot number
	#define DSC_QTABLE_MAX_NUM          (3)         ///< maximum quality control mode
    #define DSC_PANORAMA_MAX_SHOT       (3)

    #define DSC_NORMAL_PREVIEW_MODE     0
    #define DSC_FULL_PREVIEW_MODE       1
    #define DSC_TV_PREVIEW_MODE         2

    #define DSC_NORMAL_DECODE_MODE      0
    #define DSC_FULL_DECODE_MODE        1
    #define DSC_TV_NTSC_DECODE_MODE     2
    #define DSC_TV_PAL_DECODE_MODE      3
    #define DSC_PANORAMA_DECODE_MODE    4
	#if (PROJECT == DEMOKIT)
    #define DSC_JPEG_RESOL_3200x2400    0
    #define DSC_JPEG_RESOL_2560x1920    1
    #define DSC_JPEG_RESOL_2048x1536    2
    #define DSC_JPEG_RESOL_1600x1200    3
    #define DSC_JPEG_RESOL_1280x960     4
    #define DSC_JPEG_RESOL_640x480      5
    #define DSC_JPEG_RESOL_320x240      6
	#endif
    #if (PROJECT == PRESTIGE )
    #define DSC_JPEG_RESOL_2560x1920    0
    #define DSC_JPEG_RESOL_2048x1536    1
    #define DSC_JPEG_RESOL_1600x1200    2
    #define DSC_JPEG_RESOL_1280x960     3
    #define DSC_JPEG_RESOL_640x480      4
    #define DSC_JPEG_RESOL_320x240      5
	#endif    
/** @} */ // end of DSC

/** @name Video Recorder
@{ */
    /**@brief Define moving segment of AV and FT data.*/
    #define VIDRECD_MOV_AV_MASK     (~(MMP_ULONG)0x0FFF)
    #define VIDRECD_MOV_FT_MASK     (~(MMP_ULONG)0x01FF)
    #define VIDRECD_INT_AV_MASK     ((MMP_ULONG)(8*1024))

    #define VIDRECD_MODE_MAX_NUM       (7)          ///< Video system mode

    #define VIDRECD_QLEVEL_MAX_NUM     (3)          ///< Video quality from LOW to HIGH
    #define VIDRECD_QUALITY_HIGH        0           ///< Video bit rate quality, high level
    #define VIDRECD_QUALITY_MID         1           ///< Video bit rate quality, middle level
    #define VIDRECD_QUALITY_LOW         2           ///< Video bit rate quality, low level

    #define VIDRECD_FPS_MAX_NUM        (6)          ///< Video FPS from 7.5 to 30
    #define VIDRECD_FRAMERATE_30FPS     0           ///< Video frame rate, 30 fps
    #define VIDRECD_FRAMERATE_25FPS     1           ///< Video frame rate, 24 fps
    #define VIDRECD_FRAMERATE_20FPS     2           ///< Video frame rate, 20 fps
    #define VIDRECD_FRAMERATE_15FPS     3           ///< Video frame rate, 15 fps
    #define VIDRECD_FRAMERATE_10FPS     4           ///< Video frame rate, 12 fps
    #define VIDRECD_FRAMERATE_5FPS      5           ///< Video frame rate, 7.5 fps

/*
    #define VIDRECD_RESOL_MAX_NUM      (17)         ///< Video resolution from SQCIF to D1
    #define VIDRECD_RESOL_128x96        0           ///< Video resolution, 128x96
    #define VIDRECD_RESOL_176x144       1           ///< Video resolution, 176x144
    #define VIDRECD_RESOL_320x240       2           ///< Video resolution, 320x240
    #define VIDRECD_RESOL_352x288       3           ///< Video resolution, 352x288
    #define VIDRECD_RESOL_640x480       4           ///< Video resolution, 640x480
    #define VIDRECD_RESOL_720x480       5           ///< Video resolution, 720x480
    #define VIDRECD_RESOL_128x128       6           ///< Video resolution, 128x128 for VIDEO MEMO
    #define VIDRECD_RESOL_1280x720      7           ///< Video resolution, 1280x720
    #define VIDRECD_RESOL_848x480       8           ///< Video resolution, 848x480
    #define VIDRECD_RESOL_960x720       9           ///< Video resolution, 960x720
    #define VIDRECD_RESOL_272x144      10           ///< Video resolution, 272x144
    #define VIDRECD_RESOL_368x208      11           ///< Video resolution, 368x208
    #define VIDRECD_RESOL_480x272      12           ///< Video resolution, 480x272
    #define VIDRECD_RESOL_624x352      13           ///< Video resolution, 624x352
    #define VIDRECD_RESOL_912x512      14           ///< Video resolution, 912x512
    #define VIDRECD_RESOL_160x120      15           ///< Video resolution, 160x120
    #define VIDRECD_RESOL_1920x1088    16
*/
    
/** @} */ // end of video Recorder


/** @name Video Player
@{ */

    // The mode with _MAX or _NONE surfix must exists
    /// Preset 3GP Play mode configuration
    typedef enum MMPC_3GPPLAY_MODE {
        VIDEOPLAY_MODE_STD_LCD, ///< standard LCD out, fit width for demo
        VIDEOPLAY_MODE_FULLSCREEN_LCD, ///< Full screen mode for LCD
        VIDEOPLAY_MODE_ZOOM_LCD, ///< rotate 180
        VIDEOPLAY_MODE_ACTUAL_LCD, ///< Full screen mode for LCD, rotate 270
        VIDEOPLAY_MODE_NTSC_TV,  ///< NTSC TV out, fullyfilled
        VIDEOPLAY_MODE_PAL_TV,  ///< PAL TV out, fullyfilled
        VIDEOPLAY_MODE_CCIR,
        VIDEOPLAY_MODE_MAX///< used for number of play mode structure
	}MMPC_3GPPLAY_MODE;

    /// Preset 3GP Play mode osd configuration
    typedef enum MMPC_3GPPLAY_OSD_MODE{
        VIDEOPLAY_OSD_LCD, ///< standard LCD out
        VIDEOPLAY_OSD_TV, ///< custom display in OSD
        VIDEOPLAY_OSD_MAX///< used for number of OSD structure
	}MMPC_3GPPLAY_OSD_MODE;

    /// Enable Speed up 3GP parser mode
	#define PSR3GP_SPEED_UP_EN  (1)

/** @} */ // end of video player

/** @name MMP_USB
@{ */
    /// Enable PCCAM function
    #ifndef SUPPORT_PCCAM_FUNC
    #define SUPPORT_PCCAM_FUNC  (0) // 0: Disable PCCAM, 1: Enable PCCAM
    #endif
    /// Enable MTP PlayList API
    #ifndef SUPPORT_MTP_FUNC
    #define SUPPORT_MTP_FUNC    (0) // 0: Disable MTP, 1: Enable MTP
    #endif
    /// Enable DPS function (SUPPORT_MTP_FUNC also needs to be 1)
    #ifndef SUPPORT_DPS_FUNC
    #define SUPPORT_DPS_FUNC    (0) // 0: Disable DPS, 1: Enable DPS
    #endif
    /// Connect host storage device to AIT USB
    #define SUPPORT_HOST_STORAGE_DEVICE (0) // 0: Disable host storage, 1: Enable host storage
/** @} */ /* end of USB */

/** @name MMP_SYSTEM
@{ */
    /// Enable AutoClock Gating
    #ifndef BUILD_CE
    #define AUTO_CLK_GATING_EN	(1)
    #else
    #define AUTO_CLK_GATING_EN	(0)
    #endif
/** @} */ /* end of SYSTEM */

/** @name MMP_AUDIO
@{ */
    /// Enable audio host parser
    #define MP3_HOST_PARSER_EN  (0)
    #define AAC_HOST_PARSER_EN	(0)
    #define WMA_HOST_PARSER_EN	(0)
    #define WAV_HOST_PARSER_EN  (0)
	#define AMR_HOST_PARSER_EN  (0)
    #define OGG_HOST_PARSER_EN	(0)
    #define RA_HOST_PARSER_EN	(0)
    
    /// Enable audio host database
    #define	AUDIO_HOST_DB_EN	(0)
    
/** @} */ /* end of AUDIO */

/** @name Video Telephone
{ */
    /**@brief Define VT encoded video resoultion and quality level.*/
    #define VT_QLEVEL_MAX_NUM      (3)          ///< Encoded video quality from HIGH to LOW
    #define VT_QUALITY_HIGH         0           ///< Encoded video bit rate quality, high level
    #define VT_QUALITY_MID          1           ///< Encoded video bit rate quality, middle level
    #define VT_QUALITY_LOW          2           ///< Encoded video bit rate quality, low level

    #define VT_RESOL_MAX_NUM       (2)          ///< Video resolution from SQCIF to QCIF
    #define VT_RESOL_128x96         0           ///< Video resolution, 128x96
    #define VT_RESOL_176x144        1           ///< Video resolution, 176x144

    #define VT_FPS_MAX_NUM         (6)          ///< Video frame rate from 2.5 to 15
    #define VT_FRAMERATE_15FPS      0           ///< Video frame rate, 15 fps
    #define VT_FRAMERATE_12_5FPS    1           ///< Video frame rate, 12.5 fps
    #define VT_FRAMERATE_10FPS      2           ///< Video frame rate, 10 fps
    #define VT_FRAMERATE_7_5FPS     3           ///< Video frame rate, 7.5 fps
    #define VT_FRAMERATE_5FPS       4           ///< Video frame rate, 5 fps
    #define VT_FRAMERATE_2_5FPS     5           ///< Video frame rate, 2.5 fps
/** @} */ /* end of Video Telephone */

/** @name MMP_APP
{ */
    /**@brief Define customer applications usage.*/
    #define ARCSOFT_FDTC_EN        (0)          ///< Enable arcsoft face detection or not
    #define ARCSOFT_SDTC_EN        (0)          ///< Enable arcsoft smile dectection or not
/** @} */ /* end of MMP_APP */

    MMP_BOOL MMPC_System_InitConfig(void);
    MMP_BOOL MMPC_Sensor_InitConfig(void);
    MMP_BOOL MMPC_Display_InitConfig(void);
    MMP_BOOL MMPC_DSC_InitConfig(void);
    MMP_BOOL MMPC_3GPPLAY_InitConfig(void);
    MMP_BOOL MMPC_AUDIO_InitConfig(void);
    MMP_BOOL MMPC_USB_InitConfig(void);
    MMP_BOOL MMPC_VIDPHONE_InitConfig(void);

#endif /* AIT_CONFIG_H */

///@end_ait_only
